Option Explicit On 
Option Strict On

Imports TreeCreeper01Interfaces

Friend Class cPlant
    Implements IPlant

    Private pGroupingInteger As Integer
    Private pUniqueKey As String
    Private pShortId As Integer
    Private pLocationCurrent As ISpatialPlantMapLocation
    Private pLocationOriginal As ISpatialPlantMapLocation
    Private mTaxonomicpSpecies As ITaxonomicSpecies
    Private pCanBeOriginPlantForCircles As Boolean
    Private pCanBeRandomized As Boolean

    Public Sub New(ByVal GroupingInteger As Integer, ByVal UniqueKey As String, ByVal ShortId As Integer, ByVal Location As ISpatialPlantMapLocation, _
                ByVal Species As ITaxonomicSpecies, ByVal CanBeOriginPlantForCircles As Boolean, ByVal CanBeRandomized As Boolean)
        pGroupingInteger = GroupingInteger
        pUniqueKey = UniqueKey
        pShortId = ShortId
        pLocationCurrent = Location
        pLocationOriginal = Location
        mTaxonomicpSpecies = Species
        pCanBeOriginPlantForCircles = CanBeOriginPlantForCircles
        pCanBeRandomized = CanBeRandomized
    End Sub

    Friend Function Clone() As IPlant

        Dim NewPlant As IPlant

        NewPlant = New cPlant(Me.GroupingInteger, Me.UniqueKey, Me.ShortId, Me.LocationCurrent, Me.TaxonomicSpecies, Me.CanBeOriginPlantForCircles, Me.CanBeRandomized)
        Return NewPlant

    End Function

    Public ReadOnly Property GroupingInteger() As Integer Implements IPlant.GroupingInteger
        Get
            Return pGroupingInteger
        End Get
    End Property

    Public ReadOnly Property UniqueKey() As String Implements IPlant.UniqueKey
        Get
            Return pUniqueKey
        End Get
    End Property

    Public Property ShortId() As Integer Implements TreeCreeper01Interfaces.IPlant.ShortId
        Get
            Return pShortId
        End Get
        Set(ByVal value As Integer)
            pShortId = value
        End Set
    End Property

    Friend Property LocationCurrent() As ISpatialPlantMapLocation Implements IPlant.LocationCurrent
        Get
            Return pLocationCurrent
        End Get
        Set(ByVal value As ISpatialPlantMapLocation)
            pLocationCurrent = value
        End Set
    End Property

    Friend ReadOnly Property LocationOriginal() As ISpatialPlantMapLocation Implements IPlant.LocationOriginal
        Get
            Return pLocationOriginal
        End Get
    End Property

    Public ReadOnly Property TaxonomicSpecies() As ITaxonomicSpecies Implements IPlant.TaxonomicSpecies
        Get
            Return mTaxonomicpSpecies
        End Get
    End Property


    Public ReadOnly Property CanBeOriginPlantForCircles() As Boolean Implements IPlant.CanBeOriginPlantForCircles
        Get
            Return pCanBeOriginPlantForCircles
        End Get
    End Property

    Public ReadOnly Property CanBeRandomized() As Boolean Implements IPlant.CanBeRandomized
        Get
            Return pCanBeRandomized
        End Get
    End Property

End Class
